import { _decorator, Component, easing, tween, v3 } from 'cc';
const { ccclass, property } = _decorator;

@ccclass('WaterEffectSc')
export default class WaterEffectSc extends Component {
    start() {
        this.node.scale = v3(0, 0, 0);
        tween(this.node)
            .to(0.2,
                { scale: v3(1, 1, 1) },
                // { easing: cc.easeBackOut().easing }
                { easing: easing.backOut }
            )
            // .delay(0.1)
            // .to(0.2, { opacity: 0 })
            .removeSelf()
            .start();
        this.node.angle = Math.random() * 360;
    }
}